<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      Function.prototype.myCall = function (context, ...args) {
        // 拿到参数做些什么
        context.fn = this;
        context.fn();
        delete context.fn;
      };
      let o = { sing: "sing" };

      let obj = {
        name: "hyt",
        say: function () {
          console.log(this);
        },
      };
      obj.say.myCall(o, o.sing, 1, 2, 3);
    </script>
  </body>
</html>
